// 获取当前时间
export const getNowDate = () => {
    const date = new Date();
    // 获取年份（4位）
    const year = date.getFullYear();
    const month = date.getMonth();
    const day = date.getDate();
    console.log("year", year);
    console.log("month", month + 1);
    console.log("day", day);
    return `${year}-${month + 1}-${day}`;
}
// 判断当前登录用户是否是管理员
export const isAdmin = () => {
    const userData = JSON.parse(JSON.parse(localStorage.getItem('user')).v)
    console.log("userData?.roles[0]",userData?.roles[0]);
    if(userData?.roles[0] === 'super_admin' ||userData?.roles[0] === "dept_admin"){
        return true
    }else{
         console.log("false");
        return false
    }
}
